﻿using Abp.Application.Services;
using FwProject.Com.Dto;
using FwProject.ShoppingMall.EventAdvertising;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// 购物车管理
    /// </summary>
   public interface IShopCarAppService : IApplicationService
    {
        #region 购物车管理
        /// <summary>
        /// 添加一个购物车信息
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Guid> CreateShopCar(ShopCarInput Input);
        /// <summary>
        /// 批量添加购物车信息
        /// </summary>
        /// <param name="inputs">ids</param>
        /// <returns></returns>
        Task CreateListShopCar(List<ShopCarInput> inputs);
        /// <summary>
        /// 修该一个购物车信息
        /// </summary>
        /// <param name="Id">主键</param>
        /// <param name="Input">模型</param>
        /// <returns></returns>
        Task EditShopCar(ShopCarInput Input);
        /// <summary>
        /// 删除购物车信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task CleanRemoveShopCar(Guid Id);
        /// <summary>
        /// 批量删除购物车信息
        /// </summary>
        /// <param name="guids">ids</param>
        /// <returns></returns>
        Task CleanRemoveListShopCar(List<CarId> guids);
        /// <summary>
        /// 获取App用户自己的购物车信息
        /// </summary>
        /// <param name="page">页数</param>
        /// <param name="pageSize">条数</param>
        /// <returns></returns>
    
        Task<IPagedList<ShopCarDto>> GetPageList(int page, int pageSize);
        /// <summary>
        /// 获取购物车中的总数量
        /// </summary>
        /// <returns></returns>

         int GetCarCount();
        /// <summary>
        /// 获取商品在购物车中的数量
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        int GetShopCarCount(Guid shopId);
        /// <summary>
        /// 根据产品编号获取购物车中的信息
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        ShopCarDto GetProductByIdCar(Guid shopId);
        #endregion
    }
}
